package jgl.vajra.management.manager;

import android.content.Context;

import com.umeng.analytics.MobclickAgent;

import java.util.HashMap;
import java.util.Map;

import androidx.fragment.app.FragmentActivity;

public class UMAnalysisManager {
    public static void sendCourseDetailsOutlineClick(FragmentActivity activity) {
        sendEvent("CourseDetails_outline", activity);
    }

    public static void sendCourseDetailsRecommendClick(FragmentActivity activity) {
        sendEvent("CourseDetails_recommend_1", activity);
    }

    public static void sendCourseDetailsClickBuyClick(FragmentActivity activity) {
        sendEvent("CourseDetails_Clicktobuy", activity);
    }

    public static void sendConfirmorderDiscountClick(FragmentActivity activity) {
        sendEvent("Confirmorder_Discount", activity);
    }

    public static void sendConfirmorderPaymentClick(FragmentActivity activity) {
        sendEvent("Confirmorder_payment", activity);
    }

    public static void sendStudyTaskClick(FragmentActivity activity) {
        sendEvent("study_task", activity);
    }

    public static void sendStudyKeeplearningClick(FragmentActivity activity) {
        sendEvent("study_Keeplearning", activity);
    }

    public static void sendLearningdetailsDataClick(Context activity) {
        sendEvent("Learningdetails_data", (FragmentActivity) activity);
    }

    public static void sendLearningdetailsDataMailboxClick(FragmentActivity activity) {
        sendEvent("Learningdetails_data_mailbox", activity);
    }

    public static void sendLearningdetailsDataBatchClick(FragmentActivity activity) {
        sendEvent("Learningdetails_data_batch", activity);
    }

    public static void sendLearningdetailsTaskAnswerClick(FragmentActivity activity) {
        sendEvent("Learningdetails_task_answer", activity);
    }

    public static void sendLearningdetailsDownloadClick(FragmentActivity activity) {
        sendEvent("Learningdetails_download", activity);
    }

    public static void sendLearningdetailsMoreClick(FragmentActivity activity) {
        sendEvent("Learningdetails_more", activity);
    }

    public static void sendLearningdetailsMoreShareClick(FragmentActivity activity) {
        sendEvent("Learningdetails_more_share", activity);
    }

    public static void sendLearningdetailsScreenClick(FragmentActivity activity) {
        sendEvent("Learningdetails_screen", activity);
    }

    public static void sendLearningdetailsSwitchClick(FragmentActivity activity) {
        sendEvent("Learningdetails_switch", activity);
    }

    public static void sendMyOrderClick(FragmentActivity activity) {
        sendEvent("CourseDetails_outline", activity);
    }

    public static void sendMyOrderTobepaidClick(FragmentActivity activity) {
        sendEvent("my_order_Tobepaid", activity);
    }

    public static void sendMyOrderPaymentClick(FragmentActivity activity) {
        sendEvent("my_order_payment", activity);
    }

    public static void sendOrderPaymentClick(FragmentActivity activity) {
        sendEvent("order_payment", activity);
    }

    public static void sendOrderCouponClick(FragmentActivity activity) {
        sendEvent("order_coupon", activity);
    }

    public static void sendmyCouponUseClick(FragmentActivity activity) {
        sendEvent("my_coupon_use", activity);
    }

    public static void sendMyOpinionClick(FragmentActivity activity) {
        sendEvent("my_opinion", activity);
    }

    public static void sendHomeOpenClassClick(FragmentActivity activity) {
        sendEvent("home_Openclass", activity);
    }

    public static void sendHomeOpenClick(FragmentActivity activity, Map<String, Object> map) {
        sendEvent(map, "home_open_1", activity);
    }

    public static void sendHomeOpentrainingClick(FragmentActivity activity) {
        sendEvent("home_Opentraining", activity);
    }

    public static void sendHomeTrainClick(FragmentActivity activity, Map<String, Object> map) {
        sendEvent(map, "home_train_1", activity);
    }

    public static void sendCourseDetailsShareClick(FragmentActivity activity) {
        sendEvent("CourseDetails_share", activity);
    }

    public static void sendHomeBannerClick(FragmentActivity activity, Map<String, Object> map) {
        sendEvent(map, "home_banner_1", activity);
    }

    public static void sendEvent(Map<String, Object> map, String key, FragmentActivity activity) {
        map.put("type", "click");
        MobclickAgent.onEventObject(activity, key, map);
    }

    public static void sendEvent(String key, FragmentActivity activity) {
        sendEvent(new HashMap<String, Object>(), key, activity);
    }
}
